package com.mycase.im.boot.entity.database;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Author ZhuHJay
 * @Date 2021/8/1 0:07
 */
@Data
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class ImFriendRequest {

    /** 自增长主键, 需要标注为自增长 **/
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;

    /** 申请人id **/
    @NotBlank(message = "请求失败, 请重试")
    private String reqId;

    /** 申请人的信息 **/
    @TableField(exist = false)
    private ImUser reqInfo;

    /** 响应人id **/
    @NotBlank(message = "请求失败, 请重试")
    private String respId;

    /** 响应人的信息 **/
    @TableField(exist = false)
    private ImUser respInfo;

    /** 验证信息 **/
    @NotBlank(message = "验证消息不能为空")
    @Length(min = 1, max = 30, message = "验证消息长度为1-30字")
    private String validateMessage;

    /** 申请状态( 0: 等待; 1: 通过; 2: 拒绝 ) **/
    private Integer status;

}
